Skip to main content

Steps to Creating a Payment via Checkout Page

Overview

Hosted checkout pages streamline payment processing by creating customizable checkout templates, which are then used to generate checkout pages for users to complete payments.

Steps to Create a Payment Using Hosted Checkout Pages

1. Create a Checkout Page Template

Define the template layout, name, and associate payment types using the following cURL command:

curl --location 'http://localhost:3000/api/checkout-page-templates?organisation_id=2e8ccd2b-f83f-4fe8-b845-c54ab7808715' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your-auth-token>' \
--data '{
"name": "Refined Frozen Sausages",
"payment_types": [
"card", "bank_transfer", "directdebit", "outlet", "qrcode"
]
}'

2. Create a Checkout Page from the Template

Generate a checkout page based on the template:

# cURL command to create a checkout page will be available here.

3. Forward the Checkout Page to the User

Share the checkout page URL with the user, who will then have access to the various payment options.

4. Hydrate Payment Types

When the user opens the checkout page, the associated payment types are hydrated with payment method details. For each payment type, an initial transaction record is created with a status of initialised.

5. User Selects a Payment Method

The user browses available payment types, chooses a preferred method, and proceeds with either “I have already paid” or “Pay now” options.

6. Complete the Payment Process

The user takes the necessary steps to finalize payment, including any required 3D Secure (3DS) verification if applicable.

7. Update Payment Status

Once processed, the payment status is updated to completed. If the payment fails, it is updated to failed.

State Transition Diagram

Additional Information on Payment Flows

For detailed flows of each payment type, please refer to the documentation:

  • Card Payments
  • Bank Transfers
  • Direct Debits
  • Outlet Payments
  • QR Code Payments
  • E-wallet Payments